//这里试验一下他的画图功能
//正常
import edu.princeton.cs.algs4.*;
public class stdio {
    public static void main(String[] args) {
        StdDraw.square(0.5, 0.5, 0.5);
        StdDraw.setPenColor(StdDraw.BLUE);
        StdDraw.line(0.5, 0.5, 0.9, 0.5);
        StdDraw.line(0.9, 0.5, 0.5, 0.8);
        StdDraw.line(0.5, 0.8, 0.5, 0.5);
        StdDraw.circle(0.7, 0.65, 0.25);
         // set the scale of the coordinate system
        // StdDraw.setXscale(-1.0, 1.0);
        // StdDraw.setYscale(-1.0, 1.0);
        // StdDraw.enableDoubleBuffering();

        // // initial values
        // double rx = 0.480, ry = 0.860;     // position
        // double vx = 0.015, vy = 0.023;     // velocity
        // double radius = 0.05;              // radius

        // // main animation loop
        // while (true)  {

        //     // bounce off wall according to law of elastic collision
        //     if (Math.abs(rx + vx) > 1.0 - radius) vx = -vx;
        //     if (Math.abs(ry + vy) > 1.0 - radius) vy = -vy;

        //     // update position
        //     rx = rx + vx;
        //     ry = ry + vy;

        //     // clear the background
        //     StdDraw.clear(StdDraw.LIGHT_GRAY);

        //     // draw ball on the screen
        //     StdDraw.setPenColor(StdDraw.BLACK);
        //     StdDraw.filledCircle(rx, ry, radius);

        //     // copy offscreen buffer to onscreen
        //     StdDraw.show();

        //     // pause for 20 ms
        //     StdDraw.pause(20);

    }
    }
